package com.xbongbong.admin.feign;

import com.xbongbong.paas.pojo.dto.BusinessRuleWhiteDTO;
import com.xbongbong.paas.pojo.vo.BusinessRuleWhiteVO;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 业务规则-在智能助手服务
 * @author xingxing.xiao
 * @date 2020/05/11 15:40
 */
@FeignClient(name = "pro-web-pc",contextId = "formBusinessRuleFeignClient")
public interface FormBusinessRuleFeignClient {

    /**
     * 业务规则-校验版本以及白名单
     * @param businessRuleWhiteDTO 业务规则白名单参数
     * @param lang 国际化 i18n 参数
     * @return true：不可以使用业务规则；false：可以使用
     * @throws
     * @author xingxing.xiao
     * @date 2020/05/11 16:04
     */
    @RequestMapping(value = "/pro/v1/form/validateVersionAndWhite", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<BusinessRuleWhiteVO> validateVersionAndWhite(@RequestBody BusinessRuleWhiteDTO businessRuleWhiteDTO, @RequestParam("lang") String lang);



}
